package com.winning.pmph.vo;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
@Document(indexName = "article", type = "article")
public class EsArticle {

    public static final String TYPE_BOOK = "book";

    @Id
    private String id;
    @Field(type = FieldType.Keyword)
    private String type; // 图书, 期刊, 试题...
    @Field(type = FieldType.Keyword)
    private String title;
    @Field(type = FieldType.Keyword)
    private String bookId;
    @Field(type = FieldType.Keyword)
    private String bookName;
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String unitContent;
}
